﻿using System;
using System.Diagnostics.CodeAnalysis;
using Bookvar.ObjectModel;
using Bookvar.ObjectModel.Collections;

namespace Bookvar.ServiceModel
{
    public interface IAutoSaveRecoveryService
    {
        event EventHandler<AutoSavingEventArgs> AutoSaving;

        void AddMapForAutoSave( MindMap map );
        
        void RemoveMapForAutoSave( MindMap map );
        
        void ResetMapAutoSave( MindMap map );
        
        bool IsMapRecoverable( Guid mapKey );
        
        void RecoverMapTo( Guid mapKey, string pathToRecoverTo );

        [SuppressMessage( "Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate" )]
        RecoveredMapInfoCollection GetAutoSavedMaps();

        void ClearAutoSavedMaps();
    }
}